/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 global.h
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Forrest Yu, 2005
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

/* EXTERN is defined as extern except in global.c */
#ifdef	GLOBAL_VARIABLES_HERE
#undef	EXTERN
#define	EXTERN
#endif

EXTERN int mouse_count;
EXTERN int mouse_color;
EXTERN int mouse_x;
EXTERN int mouse_y;
EXTERN int old_x;
EXTERN int old_y;

EXTERN int x_sign;
EXTERN int y_sign;
EXTERN int NumOfWin;
EXTERN struct MessageQueue SysMessages; //Queue that stores all the messages in our GUI system
EXTERN MESSAGE TempMouseMsg; //Temporary Variable: used by mouse handler to create a primary message
EXTERN struct Window WinRegister[MAX_WIN_NUM];

EXTERN int ticks;
EXTERN int disp_pos;

EXTERN u8 gdt_ptr[6]; /* 0~15:Limit  16~47:Base */
EXTERN struct descriptor gdt[GDT_SIZE];
EXTERN u8 idt_ptr[6]; /* 0~15:Limit  16~47:Base */
EXTERN struct gate idt[IDT_SIZE];

EXTERN u32 k_reenter;
EXTERN int nr_current_console;

EXTERN struct tss tss;
EXTERN struct proc* p_proc_ready;

extern char task_stack[];
extern struct proc proc_table[];
extern struct task task_table[];
extern struct task user_proc_table[];
extern irq_handler irq_table[];
extern TTY tty_table[];
extern CONSOLE console_table[];

/* FS */
extern u8 * fsbuf;
extern const int FSBUF_SIZE;
EXTERN MESSAGE fs_msg;
EXTERN struct proc * pcaller;
EXTERN struct inode * root_inode;
extern struct dev_drv_map dd_map[];

/*new FS*/
EXTERN struct superBlock onlySuper;
EXTERN struct m_inode * root;
EXTERN struct m_inode * pwd;
EXTERN struct file fileTable[32];
//EXTERN struct m_inode inodeTable[32]={{0,},};

